package com.kpf.springcloud.pojo;

import lombok.*;
import lombok.experimental.Accessors;

/**
 * @Author: chenweixin
 * @CreateTime: 2019-11-20 17:29
 * @Description: 分页返回对象
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode
public class PageResult {
    /**
     * 页码
     * */
    private Integer pageNo;
    /**
     * 页数
     * */
    private Integer pageSize;
    private Long total;
    private Object data;

    public PageResult(Object data, long total){
        this.data = data;
        this.total = total;
    }
    public PageResult(Object data, long total, int pageNo, int pageSize){
        this.data = data;
        this.total = total;
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

}
